import request from '@/utils/request'
// 获取所有权限点
export function getpermission() {
  return request({
    url: '/sys/permission',
    method: 'GET'
  })
}
// 删除权限
export function delpermission(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
// 添加权限点
export function addpermission(data) {
  return request({
    url: `/sys/permission`,
    method: 'POST',
    data
  })
}
// 根据ID获取权限点详情
export function getpermDatal(id) {
  return request({
    url: `/sys/permission/${id}`,
    method: 'GET'

  })
}
// 根据ID更新权限点详情
export function updatepermission(data) {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data

  })
}
